<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-unix;$(NetCoreAppCurrent);$(NetCoreAppMinimum)-windows;$(NetCoreAppMinimum)-unix;$(NetCoreAppMinimum);netstandard2.0;$(NetFrameworkMinimum)</TargetFrameworks>
    <TargetFrameworks Condition="'$(NetCoreAppPrevious)' != ''">$(TargetFrameworks);$(NetCoreAppPrevious)-windows;$(NetCoreAppPrevious)-unix;$(NetCoreAppPrevious)</TargetFrameworks>
    <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
    <NoWarn>$(NoWarn);CA2249;CA1838</NoWarn>
    <EnableAOTAnalyzer>false</EnableAOTAnalyzer>
    <UseCompilerGeneratedDocXmlFile>false</UseCompilerGeneratedDocXmlFile>
    <IsPackable>true</IsPackable>
    <PackageDescription>Provides a collection of classes used to access an ODBC data source in the managed space

Commonly Used Types:
System.Data.Odbc.OdbcCommand
System.Data.Odbc.OdbcConnection
System.Data.Odbc.OdbcDataReader
System.Data.Odbc.OdbcDataAdapter
System.Data.Odbc.OdbcParameter
System.Data.Odbc.OdbcParameterCollection
System.Data.Odbc.OdbcTransaction</PackageDescription>
  </PropertyGroup>

  <!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
  <PropertyGroup>
    <TargetPlatformIdentifier>$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)'))</TargetPlatformIdentifier>
    <IsPartialFacadeAssembly Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETFramework'">true</IsPartialFacadeAssembly>
    <!-- https://github.com/dotnet/arcade/issues/5717 -->
    <NoWarn Condition="$([MSBuild]::GetTargetFrameworkIdentifier('$(TargetFramework)')) == '.NETCoreApp'">$(NoWarn);SA1121</NoWarn>
    <GeneratePlatformNotSupportedAssemblyMessage Condition="'$(IsPartialFacadeAssembly)' != 'true' and '$(TargetPlatformIdentifier)' == ''">SR.Odbc_PlatformNotSupported</GeneratePlatformNotSupportedAssemblyMessage>
  </PropertyGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' != ''">
    <Compile Include="$(CommonPath)System\Data\Common\AdapterUtil.cs"
             Link="Common\System\Data\Common\AdapterUtil.cs" />
    <Compile Include="$(CommonPath)System\Data\Common\AdapterUtil.Drivers.cs"
             Link="System\Data\Common\AdapterUtil.Drivers.cs" />
    <Compile Include="Common\System\Data\Common\AdapterUtil.Odbc.cs" />
    <Compile Include="Common\System\Data\Common\DbConnectionOptions.cs" />
    <Compile Include="$(CommonPath)System\Data\Common\DbConnectionOptions.Common.cs"
             Link="Common\System\Data\Common\DbConnectionOptions.Common.cs" />
    <Compile Include="$(CommonPath)System\Data\Common\DbConnectionPoolKey.cs"
             Link="System\Data\Common\DbConnectionPoolKey.cs" />
    <Compile Include="Common\System\Data\Common\DBConnectionString.cs" />
    <Compile Include="Common\System\Data\Common\DbConnectionStringCommon.cs" />
    <Compile Include="$(CommonPath)System\Data\Common\NameValuePair.cs"
             Link="Common\System\Data\Common\NameValuePair.cs" />
    <Compile Include="Common\System\Data\Common\SafeNativeMethods.cs" />
    <Compile Include="Common\System\Data\DataStorage.cs" />
    <Compile Include="Common\System\Data\ProviderBase\DbBuffer.cs" />
    <Compile Include="$(CommonPath)System\Data\Common\FieldNameLookup.cs"
             Link="Common\System\Data\ProviderBase\FieldNameLookup.cs" />
    <Compile Include="$(CommonPath)System\Data\Common\BasicFieldNameLookup.cs"
             Link="Common\System\Data\ProviderBase\BasicFieldNameLookup.cs" />
    <Compile Include="$(CommonPath)System\Data\ProviderBase\DbConnectionInternal.cs"
             Link="System\Data\ProviderBase\DbConnectionInternal.cs" />
    <Compile Include="$(CommonPath)System\Data\ProviderBase\DbConnectionFactory.cs"
             Link="System\Data\ProviderBase\DbConnectionFactory.cs" />
    <Compile Include="$(CommonPath)System\Data\ProviderBase\DbConnectionPoolGroup.cs"
             Link="System\Data\ProviderBase\DbConnectionPoolGroup.cs" />
    <Compile Include="$(CommonPath)System\Data\ProviderBase\TimeoutTimer.cs"
             Link="System\Data\ProviderBase\TimeoutTimer.cs" />
    <Compile Include="$(CommonPath)System\Data\ProviderBase\DbReferenceCollection.cs"
             Link="System\Data\ProviderBase\DbReferenceCollection.cs" />
    <Compile Include="$(CommonPath)System\Data\ProviderBase\DbMetaDataFactory.cs"
             Link="System\Data\ProviderBase\DbMetaDataFactory.cs" />
    <Compile Include="$(CommonPath)System\Data\ProviderBase\DbConnectionClosed.cs"
             Link="System\Data\ProviderBase\DbConnectionClosed.cs" />
    <Compile Include="Common\System\Data\ProviderBase\DbConnectionClosed.cs" />
    <Compile Include="Common\System\Data\ProviderBase\DbConnectionFactory.cs" />
    <Compile Include="Common\System\Data\ProviderBase\DbConnectionInternal.cs" />
    <Compile Include="Common\System\Data\ProviderBase\DbConnectionPool.cs" />
    <Compile Include="Common\System\Data\ProviderBase\DbConnectionPoolGroupProviderInfo.cs" />
    <Compile Include="Common\System\Data\ProviderBase\DbConnectionPoolIdentity.cs" />
    <Compile Include="Common\System\Data\ProviderBase\DbConnectionPoolOptions.cs" />
    <Compile Include="Common\System\Data\ProviderBase\DbConnectionPoolProviderInfo.cs" />
    <Compile Include="System\Data\Odbc\DbDataRecord.cs" />
    <Compile Include="System\Data\Odbc\Odbc32.cs" />
    <Compile Include="System\Data\Odbc\OdbcCommand.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="System\Data\Odbc\OdbcCommandBuilder.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="System\Data\Odbc\OdbcConnection.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="System\Data\Odbc\OdbcConnectionFactory.cs" />
    <Compile Include="System\Data\Odbc\OdbcConnectionHandle.cs" />
    <Compile Include="System\Data\Odbc\OdbcConnectionHelper.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="System\Data\Odbc\OdbcConnectionOpen.cs" />
    <Compile Include="System\Data\Odbc\OdbcConnectionPoolProviderInfo.cs" />
    <Compile Include="System\Data\Odbc\OdbcConnectionString.cs" />
    <Compile Include="System\Data\Odbc\OdbcConnectionStringbuilder.cs" />
    <Compile Include="System\Data\Odbc\OdbcDataAdapter.cs">
      <SubType>Component</SubType>
    </Compile>
    <Compile Include="System\Data\Odbc\OdbcDataReader.cs" />
    <Compile Include="System\Data\Odbc\OdbcEnvironment.cs" />
    <Compile Include="System\Data\Odbc\OdbcEnvironmentHandle.cs" />
    <Compile Include="System\Data\Odbc\OdbcError.cs" />
    <Compile Include="System\Data\Odbc\OdbcErrorCollection.cs" />
    <Compile Include="System\Data\Odbc\OdbcException.cs" />
    <Compile Include="System\Data\Odbc\OdbcFactory.cs" />
    <Compile Include="System\Data\Odbc\OdbcHandle.cs" />
    <Compile Include="System\Data\Odbc\OdbcInfoMessageEvent.cs" />
    <Compile Include="System\Data\Odbc\OdbcMetaDataCollectionNames.cs" />
    <Compile Include="System\Data\Odbc\OdbcMetaDataColumnNames.cs" />
    <Compile Include="System\Data\Odbc\OdbcMetaDataFactory.cs" />
    <Compile Include="System\Data\Odbc\OdbcParameter.cs" />
    <Compile Include="System\Data\Odbc\OdbcParameterCollection.cs" />
    <Compile Include="System\Data\Odbc\OdbcParameterCollectionHelper.cs" />
    <Compile Include="System\Data\Odbc\OdbcParameterHelper.cs" />
    <Compile Include="System\Data\Odbc\OdbcReferenceCollection.cs" />
    <Compile Include="System\Data\Odbc\OdbcRowUpdatingEvent.cs" />
    <Compile Include="System\Data\Odbc\OdbcStatementHandle.cs" />
    <Compile Include="System\Data\Odbc\OdbcTransaction.cs" />
    <Compile Include="System\Data\Odbc\OdbcType.cs" />
    <Compile Include="System\Data\Odbc\OdbcUtils.cs" />
    <Compile Include="$(CommonPath)System\NotImplemented.cs"
             Link="Common\System\NotImplemented.cs" />
    <Compile Include="$(CommonPath)System\Obsoletions.cs"
             Link="Common\System\Obsoletions.cs" />
    <Compile Include="Common\System\HResults.cs" />
    <Compile Include="$(CommonPath)System\Data\Common\MultipartIdentifier.cs"
             Link="Common\System\Data\Common\MultipartIdentifier.cs" />
    <Compile Include="$(CommonPath)Interop\Interop.Odbc.cs"
             Link="Common\Interop\Interop.Odbc.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'" >
    <Compile Include="System\Data\Odbc\ODBC32.Common.cs"/>

    <Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
             Link="Common\DisableRuntimeMarshalling.cs" />
    <Compile Include="$(CommonPath)System\Runtime\InteropServices\HandleRefMarshaller.cs"
             Link="Common\System\Runtime\InteropServices\HandleRefMarshaller.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'unix'">
    <Compile Include="$(CommonPath)Interop\Unix\Interop.Odbc.cs"
             Link="Common\Interop\Unix\Interop.Odbc.cs" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'windows'">
    <Compile Include="$(CommonPath)Interop\Windows\Interop.Libraries.cs"
             Link="Common\Interop\Windows\Interop.Libraries.cs" />
  </ItemGroup>

  <ItemGroup>
    <EmbeddedResource Include="Resources\System.Data.Odbc.OdbcMetaData.xml"
                      LogicalName="System.Data.Odbc.OdbcMetaData.xml" />
  </ItemGroup>

  <ItemGroup>
    <None Include="DatabaseSetupInstructions.md" />
  </ItemGroup>

  <ItemGroup Condition="'$(TargetFrameworkIdentifier)' == '.NETCoreApp'">
    <ProjectReference Include="$(LibrariesProjectRoot)System.Text.Encoding.CodePages\src\System.Text.Encoding.CodePages.csproj" />
  </ItemGroup>

</Project>
